package source.events;


/**
 * Class ModelEvent is the event class responsible for communication to the model.
 * Currently this event only packages a type and a playerID.  The constructor
 * takes a ModelEventType to restrict the possible values of the type attribute.
 * @author Joe
 *
 */
public class ModelEvent extends Event{

	private int targetPlayerID;
	
	public ModelEvent(int pid, ModelEventType met)
	{
		targetPlayerID = pid;
		type = met.toString();
	}
	
	/**
	 * @return targetPlayerId: int, the target player's ID
	 */
	
	public int getPlayerID()
	{
		return targetPlayerID;
	}
	
	/**
	 * @return type: String, the type that the ModelEvent is
	 */
	
	public String getType()
	{
		return type;
	}
	
	public String toString()
	{
		return "Player " + targetPlayerID + ": " + type;
	}
}
